You did not change the behavior of the code. You only changed the structure of the solution.
You are defining "behavior" in terms of the examples. So as you did these changes, you broke none of the examples.
You took very small steps and ran the examples often. This way you knew right away if you broke anything. When someone who practices BDD says something pithy like "why have you not run your examples in the past 5 minutes", you can now better understand how they accomplish this.
For this to be possible it has to be easy and very quick to run the examples. For this example that will be the case. As you move into more complex problems, you'll have to revisit this.
A couple things about refactoring: